<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户信息(按kkuid分区)')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-kkuserInfo-edit" th:object="${kkuserInfo}">
            <input name="kkuid" th:field="*{kkuid}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">音频审核权限：</label>
                <div class="col-sm-8">
                    <select name="auditPermission" class="form-control m-b" th:with="type=${@dict.getType('common_support')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{auditPermission}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">权限过期时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="auditPermissionExpired" th:value="${#dates.format(kkuserInfo.auditPermissionExpired, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "yuwen/kkuserInfo";
        $("#form-kkuserInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-kkuserInfo-edit').serialize());
            }
        }

        $("input[name='auditPermissionExpired']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>